<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"                
                xmlns:ds="http://deltaset.org/deltaset-faces"
                xmlns:app="http://java.sun.com/jsf/composite/app"
                xmlns:composite="http://java.sun.com/jsf/composite">
    <composite:interface>        
        <composite:attribute name="pageTitle" type="java.lang.String" required="true"/>        
    </composite:interface>

    <composite:implementation>
        <f:view contentType="text/html; charset=utf-8">
            <ds:applyStyle/>
            <h:outputStylesheet name="app/css/layout.css"/>

            <ui:decorate template="internal/layout-two-column.xhtml">
                <ui:param name="themeName" value="#{preferencesBean.themeName}"/>
                <ui:param name="menuPosition" value="#{preferencesBean.layoutName}"/>
                <ui:define name="title">#{msg['app.name']}:#{cc.attrs.pageTitle}</ui:define>
                <ui:define name="preferences">
                    <a href="/gpintro.html">flash intro</a>
                    <h:link value="Signup" outcome="/register" style="margin-left: 10px;" rendered="#{not preferencesBean.isUserLoggedIn}"/>
                    <h:link value="#{msg['login.title']}" outcome="/login" style="margin-left: 10px;" rendered="#{not preferencesBean.isUserLoggedIn}"/>
                    <h:outputLink  value="/logout" style="margin-left: 10px;" rendered="#{preferencesBean.isUserLoggedIn}">#{msg['logout.title']}</h:outputLink>
                    <app:preferences/>
                </ui:define>
                <ui:define name="top">
                    <h:link outcome="/welcome">
                        <h:graphicImage value="/resources/app/css/img/logo_web.png"/>
                    </h:link>
                </ui:define>
                <ui:define name="menu">
                    <ui:include src="menu.xhtml"/>
                </ui:define>
                <ui:define name="content">                    
                    <composite:insertChildren/>
                </ui:define>
                <ui:define name="footer">
                    <div style="text-align: right">
                        <h:outputText escape="false" value="#{msg['app.footer']}"/>
                    </div>
                </ui:define>
            </ui:decorate>
            <ui:debug />
        </f:view>
    </composite:implementation>
</ui:composition>

